package alibaba.ifelserefactor.demo01.test03;

import alibaba.ifelserefactor.demo01.ShareListener;
import alibaba.ifelserefactor.demo01.ShareType;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

/**
 * @author ChangLiang
 * @date 2020/4/20
 */
@Slf4j
public class Text extends ShareItem {
    String content;

    public Text(ShareType type) {
        super(type);
        this.content = !StringUtils.isEmpty(content) ? content : "default";
    }

    @Override
    public void doShare(ShareListener listener) {
        log.info("share text");
    }
}
